<?php

use IDock\Insurance\DAJIA\Bean\Applicant;
use IDock\Insurance\DAJIA\Bean\BasePartReq;
use IDock\Insurance\DAJIA\Bean\BusinessInfo;
use IDock\Insurance\DAJIA\Bean\ChargingPost;
use IDock\Insurance\DAJIA\Bean\CheckInfo;
use IDock\Insurance\DAJIA\Bean\Coverage;
use IDock\Insurance\DAJIA\Bean\InspectionInfo;
use IDock\Insurance\DAJIA\Bean\InsuredInfo;
use IDock\Insurance\DAJIA\Bean\NvhPolicy;
use IDock\Insurance\DAJIA\Bean\SpecialInfo;
use IDock\Insurance\DAJIA\Bean\SpecialVehicleInfo;
use IDock\Insurance\DAJIA\Bean\VehicleInfo;
use IDock\Insurance\DAJIA\Bean\VehicleOwnerInfo;
use IDock\Insurance\DAJIA\Bean\VehicleTaxation;
use IDock\Insurance\DAJIA\DAJIAConstruct;
use IDock\Visitor\VehicleActualValueVisitor;
use IDock\Visitor\VehicleModelVisitor;

require_once 'vendor/autoload.php';

$ACICConfig = [
    'gateway' => 'https://pidat.djbx.com/hx/cx-center/apply',
    'channelCode' => 'G-HX',
    'channelPwd' => '123456',
    'secretKey' => 'hc8xxWi5XPjtNDDd4cR1651734297181',
    'deviceType' => 'server',
    'logsDir' => './DAJIALogs',
    'timeout' => '60',
    'proxy' => '118.123.247.195:45131',
];


$IDockDAJIA = new DAJIAConstruct($ACICConfig);

global $testResponse;

//$testResponse = '{"data":"0B45FAFE027D6E6191622353E5066A5D461090DBBCEC9465085AFBE8E9E169EFA748967B276A5BA83F5809B742D25E251879DE6E7FCF5BE41A0CB49C31B27B8AF0BD4EDBF515F8D5773D9751AAF477FA50461B84819EE2852223A328B2192D4A","signature":"3526f8876675e2a31e9ae6e66bc9040f","timestamp":"1683604101666"}';

try {

    if (0) {
        //查询保单
        $response = $IDockDAJIA->InsuranceOrderQuery('D2023080207000000207f3228b1ed254');
        var_dump($response->getCode());
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getBody());
    }

    if (0) {
        //订单状态轨迹查询
        $response = $IDockDAJIA->InsuranceOrderTrackQuery('G_HNTS', '2023-06-25 00:00:00', '2023-06-25 23:59:59');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //获取业务订单号接口 D2023080707000000209261e41bc6d74
        $response = $IDockDAJIA->BusinessOrderNoQuery('07', '00000020', '365001');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getPrinter()->toArray());
    }

    if (0) {
        //车辆和客户信息确认
        //车架号：LNNKANKY7AD1PN225
        //发动机号：ENGAWCO414
        //号牌号码：川A89103
        //初登日期：2021-06-14
        $applicant = new Applicant();
        $applicant->setApplicantNme('成都海底捞股份有限公司');
        $applicant->setApplicantCCertfCde('912113036737516343');
        $applicant->setApplicantCCertfCls('04');
        $applicant->setApplicantClntMrk('3');//客户类型
        $applicant->setApplicantProvince('510000');
        $applicant->setApplicantCity('510100');
        $applicant->setApplicantCounty('510184');
        $applicant->setApplicantSuffixAddr('崇阳镇北郊１组');
        $applicant->setApplicantClntAddr('四川省崇州市崇阳镇北郊１组');
        $applicant->setApplicantZipCde('611200');//邮编
        $applicant->setApplicantEmail('18615715950@163.com');
        $applicant->setApplicantMobile('18615715950');
        $applicant->setApplicantSex('');
        $applicant->setApplicantTBirthday('');
        $applicant->setApplicantTEffectiveDate('2023-05-15');
        $applicant->setApplicantTExpiredDate('2035-05-15');
        //业务范围
        $businessInfo = new BusinessInfo();
        $businessInfo->setBusiId('janfish9234560099');
        $businessInfo->setBusiOpdpt('07');//登录机构
        $businessInfo->setBusiDptCde('07000002');//出单口【有效，关联匹配】
        $businessInfo->setBusiBrkrCde('000201500000');//代理人编码【有效，关联匹配】
        $businessInfo->setBusiOprCde('00000020');//操作员代码
        $businessInfo->setBusiBsnsTyp('19002');//业务来源
        $businessInfo->setBusiSlsCde('02000176');//业务员代码
        $businessInfo->setBusiRecommendCde('02000176');//推荐人代码【有效，关联匹配】
        $businessInfo->setBusiRecSubChannel('C999');//推荐子渠道【有效，关联匹配】
        $businessInfo->setBusiRepairFlag('0');//是否返修
        $businessInfo->setBusiChannelSrc('10');//渠道【有效，关联匹配】
        $businessInfo->setBusiDataSrc('G');//一级来源
        $businessInfo->setBusiDataFlag('HX');//二级来源
        //车主信息
        $owner = new VehicleOwnerInfo();
        $owner->setVehicleOwnerCCertfCde('912113036737516343');
        $owner->setVehicleOwnerCCertfCls('04');
        $owner->setVehicleOwnerCClntAddr('四川省崇州市崇阳镇北郊１组');
        $owner->setVehicleOwnerCContactTel('18615715950');
        $owner->setVehicleOwnerCEmail('18615715950@163.com');
        $owner->setVehicleOwnerCMobile('18615715950');
        $owner->setVehicleOwnerCOwnerCls('3');
        $owner->setVehicleOwnerCOwnerNme('成都海底捞股份有限公司');
        $owner->setVehicleOwnerCZipCde('611200');
        $owner->setVehicleOwnerTBirthday('');
        $owner->setVehicleOwnerTExpiredDate('2035-05-15');
        $owner->setVehicleOwnerCNation('1');
        $owner->setVehicleOwnerCSex('');

        //被保人信息
        $insuredInfo = new InsuredInfo();
        $insuredInfo->setInsuredCertfCde('912113036737516343');
        $insuredInfo->setInsuredCertfCls('04');
        $insuredInfo->setInsuredProvince('510000');
        $insuredInfo->setInsuredCity('510100');
        $insuredInfo->setInsuredCounty('510184');
        $insuredInfo->setInsuredSuffixAddr('崇阳镇北郊１组');
        $insuredInfo->setInsuredClntAddr('四川省崇州市崇阳镇北郊１组');
        $insuredInfo->setInsuredClntMrk('3');
        $insuredInfo->setInsuredEmail('18615715950@163.com');
        $insuredInfo->setInsuredNme('成都海底捞股份有限公司');
        $insuredInfo->setInsuredMobile('18615715950');
        $insuredInfo->setInsuredResidAddr('四川省崇州市');
        $insuredInfo->setInsuredSex('');
        $insuredInfo->setInsuredZipCde('611200');
        $insuredInfo->setInsuredTBirthday('');
        $insuredInfo->setInsuredTEffectiveDate('2023-05-15');
        $insuredInfo->setInsuredTExpiredDate('2035-05-15');

        //车辆信息
        $vehicle = new VehicleInfo();
        $vehicle->setVehicleNewMrk('0');//是否上牌
        $vehicle->setVehicleNewPlate('1');//新车
        $vehicle->setVehicleEngNo('ENGAWCO414');
        $vehicle->setVehicleFrmNo('LNNKANKY7AD1PN225');
        $vehicle->setVehicleChgOwnerFlag('0');
        $vehicle->setVehicleFstRegYmBar('2023-07-25');
        $vehicle->setVehicleFuelType('1');//纯电动
        $vehicle->setVehicleModelCde('BJD2821BJQ');//车型
        $vehicle->setVehicleModelNme('北京BJ7001B3D2-BEV纯电动轿车');//车型名称
        $vehicle->setVehiclePlateNo('川A89103');//车牌号
        $vehicle->setVehiclePlateTyp('02');//证件类型
        $vehicle->setVehicleRegVhlTyp('K25');//行驶证车辆类型
        $vehicle->setVehicleVhlTyp('365002');//车辆种类 6-10人
        $vehicle->setVehicleTfiSpecialMrk('0');
//        $vehicle->setVehicleUsageCde('364001001');//商业险 家庭自用轿车
        $vehicle->setVehicleNConsultPurchaseValue('103611.73');//协商价格
        $vehicle->setVehicleSpecialRiskFlag('0');//特殊风险标识
        $vehicle->setVehicleNPower('84');
        $vehicle->setVehicleModelEnergyType('1');//纯电动
        $vehicle->setVehicleNPureRange('0');
        $vehicle->setVehicleTraUsageCde('364001001');
        $vehicle->setVehicleIsQuery('1');
        $vehicle->setVehicleEcdemicMrk('0');
        $vehicle->setVehicleNCurbWt('2.4');
        $vehicle->setVehicleNDisplacement('0');//排量
        $vehicle->setVehicleInspectionCde('305005002');
        $vehicle->setVehicleInspectTm('2023-07-25');
        $vehicle->setVehicleInspectorNme('张峰');
        $vehicle->setVehicleInspectRec('382001');
        $vehicle->setVehicleResvTxt1('其他');
        $vehicle->setVehicleNNewPurchaseValue('134695.25');//新车价
        $vehicle->setVehicleNSeatNum('7');
        $vehicle->setVehicleUsageCde('374002');

        //$response = $IDockDAJIA->VehicleAndCustomerInfoConfirm('D2023080707000000209261e41bc6d74', $applicant, $businessInfo, $owner, $insuredInfo, $vehicle);
        //var_dump($response->isSuccess());
        //var_dump($response->getError());
        //var_dump($response->getMessage());
        //var_dump($response->getData());
    }

    if (0) {
        //保费计算
        $baseInfo = new BasePartReq();
        $baseInfo->setJqEffectiveDate('2023-08-20 00:00:00');//交强险生效时间
        $baseInfo->setJqExpireDate('2024-08-19 17:59:59');//交强险失效时间
        $baseInfo->setJqImmeffMrk('0');
        $baseInfo->setSyEffectiveDate('2023-08-20 00:00:00');//商业险生效时间
        $baseInfo->setSyExpireDate('2024-08-19 23:59:59');//商业险失效时间
        $baseInfo->setSyImmeffMrk('0');
        $baseInfo->setSyExpectedFloatingRate('1.3');//期望折扣
        $baseInfo->setFixedDropDiscount('0');//商业折扣是否浮动
        $baseInfo->setJqProdNo('0320');
        $baseInfo->setSyProdNo('0358');//商业险类型 0358新能源
        $baseInfo->setFinType('10');//收费方式
        $baseInfo->setConsultPurchaseValue('103611.73');//协商实际价值

        //商业险信息
        $coverage = new Coverage();
        $coverage->setCvrgNo('035802');//第三方责任险
//        $coverage->setLossNAmt('0');//车损险保额
//        $coverage->setLossNoPayAmt('0');
        $coverage->setThreeCIndemLmtLvl('306006014');
        $coverage->setThreeNDeductionRate('-5');
        $coverage->setThreeNIndemLmt('1000000');
        $coverageList = [$coverage];

        $coverage1 = new Coverage();
        $coverage1->setCvrgNo('035804');//车上人员责任险驾驶人
        $coverage1->setDriverNDeductionRate('-5');//
        $coverage1->setDriverNLiabDaysLmt('1');//
        $coverage1->setDriverNPerAmt('10000');
//        $coverage1->setDriverMedicalAmt('10000');//
//        $coverage1->setDriverMoralDamageAmt('8000');

        $coverage2 = new Coverage();
        $coverage2->setCvrgNo('035801');//车辆损失保险
        $coverage2->setLossNAmt('103611.73');
        $coverage2->setLossNoPayAmt('375002');//免赔额
        $coverage2->setLossNDeductionRate('-5');///绝对免赔率

        $coverage3 = new Coverage();
        $coverage3->setCvrgNo('035803');//车上人员责任险乘客
//        $coverage3->setPassengerMoralDamageAmt('1000000');
        $coverage3->setPassengerNLiabDaysLmt('6');//乘客座位数
        $coverage3->setPassengerNPerAmt('40000');//乘客每人保额
        $coverage3->setPassengerNDeductionRate(-5);

        $coverage4 = new Coverage();
        $coverage4->setCvrgNo('030061');//全车盗抢保险
        $coverage4->setTherfNNAmt('171626');//盗抢险保额
        $coverage4->setTherfNDeductionRate('-5');

        $coverage5 = new Coverage();
        $coverage5->setCvrgNo('035810');//道路救援服务特约条款
        $coverage5->setRoadRescueServices('1');//道路救援服务次数

        $coverage6 = new Coverage();
        $coverage6->setCvrgNo('035811');//车辆安全检测特约条款
        $coverage6->setVehicleSafetyInspectionServices('1');

        $coverage7 = new Coverage();
        $coverage7->setCvrgNo('035812');//代为驾驶服务特约条款
        $coverage7->setDrivingServiceTimes('1');

        $coverage8 = new Coverage();
        $coverage8->setCvrgNo('035813');//代为送检服务特约条款
        $coverage8->setInspectionServiceTimes('1');

        array_push(
            $coverageList,
            $coverage1,
            $coverage2,
            $coverage3
//            $coverage4,
//            $coverage5
//            $coverage6,
//            $coverage7,
//            $coverage8
        );

        //车船税 交强险必传
        $vehicleTaxation = new VehicleTaxation();
        $vehicleTaxation->setTaxPaytaxTyp('3T5002');
        $vehicleTaxation->setTaxEffBgnTm('2023-07-11 00:00:00');
        $vehicleTaxation->setTaxEffEndTm('2024-07-11 00:00:00');
        $vehicleTaxation->setTaxTaxfreeVhltyp('');
        $vehicleTaxation->setTaxFreeRedTaxWay('');
        $vehicleTaxation->setTaxFreeRedTaxPro('');
        $vehicleTaxation->setTaxAbateAmt('');
        $vehicleTaxation->setTaxFreeCertNo('');
        $vehicleTaxation->setTaxFreeRedTaxOrgCde('');
        $vehicleTaxation->setTaxFreeTaxOrg('');
        $vehicleTaxation->setTaxComTaxOrgCde('');
        $vehicleTaxation->setTaxComTaxOrg('');
        $vehicleTaxation->setTaxPaymentRecptNo('');
        $vehicleTaxation->setTaxDocumentDate('');
        $vehicleTaxation->setTaxPaidAreaCode('');
        $vehicleTaxation->setTaxDeptNonlocal('');
        $vehicleTaxation->setTaxdptVhltyp('');
        $vehicleTaxation->setTaxTaxpayerId('');

        //商业平台车型信息
        $vehicleInfo = new SpecialVehicleInfo();
        $vehicleInfo->setVehlcleCode('');
        $vehicleInfo->setVehlcleModeCode('');
//        $vehicleInfo->setVehicleStyleUniqueId('');//单交强精准传值
//        $vehicleInfo->setVehicleIndustryModelCode('');////单交强精准传值

        //关联非车信息 非必填
        $policy = new NvhPolicy();
        $policy->setNvhlProdCode('');
        $policy->setNvhlSchemeCode('');
        $policy->setNvhlEffectiveDate('');
        $policy->setNvhlExpireDate('');
        $policy->setNoVhlSum('0');
        $policy->setNvhlPrm('0');
        $policy->setNvhlSumPrm('0');
        $policy->setNvGoodsCode('');
        $policy->setNvDutyRiskCode('');
        $policyList = [];
        //充电桩 非必填
//        $chargePost = new ChargingPost();
//        $chargePost->setChargingSeqNo('');
//        $chargePost->setChargingPostType('');
//        $chargePost->setChargingPostCode('');
//        $chargePost->setChargingPostAddress('');
//        $chargePost->setChargingPostAddressType('');
//        $chargePost->setChargingPostKind('');
//        $chargePost->setChargingPostYearLimit('');
//        $chargePost->setChargingLossAmt('');
//        $chargePost->setChargingLiabilityAmt('');
//        $chargePost->setChargingCvrgFlag('');

        //验车信息
        $inspectionInfo = new InspectionInfo();
        $inspectionInfo->setVehicleInspectionCde('305005002');
        $inspectionInfo->setVehicleInspectTm('2023-07-25');
        $inspectionInfo->setVehicleInspectorNme('张峰');
        $inspectionInfo->setVehicleInspectRec('382001');
        $inspectionInfo->setVehicleResvTxt1('其他');
        $inspectionInfo->setDamagedSite('');

        //特殊字段
        $specialInfo = new SpecialInfo();
        $specialInfo->setVehicleUsageCde('374002');
        $specialInfo->setBusiServiceCode('');
        $specialInfo->setStaffCar('');
        $motorJointType = '2';//1单交强 2单商业 3交商联合
        $response = $IDockDAJIA->InsurancePriceQuery('D2023080707000000209261e41bc6d74', $motorJointType, $baseInfo, $vehicleInfo, $coverageList, $vehicleTaxation, $policyList, [], [], $specialInfo);
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
        //交强险单号 0070003202023003815
    }

    if (0) {
        //核保接口
        $businessInfo = new BusinessInfo();
        $businessInfo->setBusiId('janfish9234560099');//这里的id要和车辆和客户信息确认接口的一致！
        $businessInfo->setBusiOpdpt('07');
        $businessInfo->setBusiDptCde('07000002');
        $businessInfo->setBusiBrkrCde('000201500000');
        $businessInfo->setBusiOprCde('00000020');
        $businessInfo->setBusiBsnsTyp('19002');
        $businessInfo->setBusiSlsCde('02000176');
        $businessInfo->setBusiRecommendCde('02000176');
        $businessInfo->setBusiRecSubChannel('C999');
        $businessInfo->setBusiRepairFlag('0');
        $businessInfo->setBusiChannelSrc('10');
        $businessInfo->setBusiDataSrc('G');
        $businessInfo->setBusiDataFlag('HX');

        //检查讯息
        $check = new CheckInfo();
        $check->setVehiclePlateNo('川A89103');
        $check->setVehicleFrmNo('LNNKANKY7AD1PN225');
        $check->setApplicantNme('成都海底捞股份有限公司');
        $check->setApplicantCCertfCde('912113036737516343');
        $check->setApplicantMobile('18615715950');
        $check->setInsuredNme('成都海底捞股份有限公司');
        $check->setInsuredCertfCde('912113036737516343');
        $check->setInsuredMobile('18615715950');
        //交强特别约定信息
        $jqSpecialEngageList = [
            ['specialClausesCode' => '07999999', 'specialClausesContent' => '标的车辆投保时，验车车身以下部位存在明显损伤：成都海底捞股份有限公司（详见验车照片），在投保人或被保险人修理好前述车身损伤并提供合格验车照片由保险人进行批改后再出险，前述部位的损失方可纳入保险责任范围内。'],
            ['specialClausesCode' => '07010320', 'specialClausesContent' => '行驶证车主为成都海底捞股份有限公司，该车实际归成都海底捞股份有限公司所有，归成都海底捞股份有限公司使用。'],
            ['specialClausesCode' => '07020320', 'specialClausesContent' => '其车险相关信息将由本公司共享至四川省保险行业协会，用于（且仅用于）行业与交管等政府部门进行信息共享，用于风险防范、社会管理等目的。'],
//            ['specialClausesCode' => '07060320', 'specialClausesContent' => '本保单进行保费实收后即时开始生效，保险止期相应提前。'],
            ['specialClausesCode' => '0788880320', 'specialClausesContent' => '本保单的投保人为成都海底捞股份有限公司，车主为成都海底捞股份有限公司。'],
        ];
        //新能源特约
        $jqSpecialEngageList = [
//            ['specialClausesCode' => '07999999', 'specialClausesContent' => '标的车辆投保时，验车车身以下部位存在明显损伤：成都海底捞股份有限公司（详见验车照片），在投保人或被保险人修理好前述车身损伤并提供合格验车照片由保险人进行批改后再出险，前述部位的损失方可纳入保险责任范围内。'],
            ['specialClausesCode' => '07010320', 'specialClausesContent' => '行驶证车主为成都海底捞股份有限公司，该车实际归成都海底捞股份有限公司所有，归成都海底捞股份有限公司使用。'],
            ['specialClausesCode' => '07020320', 'specialClausesContent' => '其车险相关信息将由本公司共享至四川省保险行业协会，用于（且仅用于）行业与交管等政府部门进行信息共享，用于风险防范、社会管理等目的。'],
//            ['specialClausesCode' => '07060320', 'specialClausesContent' => '本保单进行保费实收后即时开始生效，保险止期相应提前。'],
            ['specialClausesCode' => '0788880320', 'specialClausesContent' => '本保单的投保人为成都海底捞股份有限公司，车主为成都海底捞股份有限公司。'],
        ];

        //商业特别约定信息（列表）
        $sySpecialEngageList = [
            ['specialClausesCode' => '07930356', 'specialClausesContent' => '发生保险事故时被保险机动车行驶证、号牌被注销的，保险公司不负责赔偿。'],
            ['specialClausesCode' => '07090326', 'specialClausesContent' => '行驶证车主为成都海底捞股份有限公司，该车实际归成都海底捞股份有限公司所有，归成都海底捞股份有限公司使用。'],
//            ['specialClausesCode' => '07999999', 'specialClausesContent' => '标的车辆投保时，验车车身以下部位存在明显损伤：成都海底捞股份有限公司（详见验车照片），在投保人或被保险人修理好前述车身损伤并提供合格验车照片由保险人进行批改后再出险，前述部位的损失方可纳入保险责任范围内。'],
            ['specialClausesCode' => '07010356', 'specialClausesContent' => '其车险相关信息将由本公司共享至四川省保险行业协会，用于（且仅用于）行业与交管等政府部门进行信息共享，用于风险防范、社会管理等目的。'],
            ['specialClausesCode' => '07150356', 'specialClausesContent' => '经双方约定，投保人自愿投保修理期间费用补偿险。若发生保险事故，致使被保险机动车停驶，按照保险合同约定，在保险金额范围内，被保险人需返回保险人授权的本品牌专营店维修，且依据租赁汽车发票向保险人索赔补偿修理期间代步车费用。'],
            ['specialClausesCode' => '07190356', 'specialClausesContent' => '此车按非营业投保。如用于营业，发生保险事故，保险人不承担赔偿责任。'],
            ['specialClausesCode' => '0788880356', 'specialClausesContent' => '本保单的投保人为成都海底捞股份有限公司，车主为成都海底捞股份有限公司。'],
            ['specialClausesCode' => '07760356', 'specialClausesContent' => '因电池组使用过程中的电池故障及异常，造成电池组自身及本车电器原件的损坏，不属于保险责任。'],
        ];
        //新能源特约
        $sySpecialEngageList = [
            ['specialClausesCode' => 'TY-002', 'specialClausesContent' => '此车按非营业投保。如用于营业，发生保险事故，保险人不承担赔偿责任。'],
            ['specialClausesCode' => '07190358', 'specialClausesContent' => '此车按非营业投保。如用于营业，发生保险事故，保险人不承担赔偿责任。'],
            ['specialClausesCode' => '07090326', 'specialClausesContent' => '行驶证车主为成都海底捞股份有限公司，该车实际归成都海底捞股份有限公司所有，归成都海底捞股份有限公司使用。'],
            ['specialClausesCode' => '0700358', 'specialClausesContent' => '本保单项下附加自用充电桩损失保险的充电桩编码为：321。'],
//            ['specialClausesCode' => '07999999', 'specialClausesContent' => '标的车辆投保时，验车车身以下部位存在明显损伤：成都海底捞股份有限公司（详见验车照片），在投保人或被保险人修理好前述车身损伤并提供合格验车照片由保险人进行批改后再出险，前述部位的损失方可纳入保险责任范围内。'],
            ['specialClausesCode' => '07010358', 'specialClausesContent' => '其车险相关信息将由本公司共享至四川省保险行业协会，用于（且仅用于）行业与交管等政府部门进行信息共享，用于风险防范、社会管理等目的。'],
            ['specialClausesCode' => '07930358', 'specialClausesContent' => '发生保险事故时被保险机动车行驶证、号牌被注销的，保险公司不负责赔偿。'],
            ['specialClausesCode' => '0710358', 'specialClausesContent' => '本保单项下附加自用充电桩责任保险的充电桩编码为：321。'],
            ['specialClausesCode' => '0788880356', 'specialClausesContent' => '本保单的投保人为成都海底捞股份有限公司，车主为成都海底捞股份有限公司。'],
            ['specialClausesCode' => '07020358', 'specialClausesContent' => '本保单车损险绝对免赔额为：300元'],
        ];

        $response = $IDockDAJIA->InsuranceConfirm($businessInfo, $check, 'D2023080707000000209261e41bc6d74', '无意见', '007001', '', $jqSpecialEngageList, $sySpecialEngageList);
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());

    }

    if (0) {
        //车型查询
        $visitor = new VehicleModelVisitor();
        $visitor->vehicleModel = '丰田TV7152X轿车';
        $visitor->vin = 'LUZAGBGA9PA064926';
        $visitor->argc['orderNo'] = 'D20230606070000002069c21a07d36a4';
        $response = $IDockDAJIA->vehicleModel($visitor);
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //车辆实际价值计算接口
        $visitor = new VehicleActualValueVisitor();
        $visitor->argc['orderNo'] = 'D2023080707000000209261e41bc6d74';
        $visitor->startDate = '2023-08-20 00:00:00';
        $response = $IDockDAJIA->vehicleActualValue($visitor);
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //获取电子签名页面接口
        $response = $IDockDAJIA->ElectronicSignQuery('D2023080707000000209261e41bc6d74', '00000020');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //业务订单退回接口
        $response = $IDockDAJIA->CancelOrder('D2023080707000000209261e41bc6d74');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());

    }

    if (0) {
        //业务订单删除接口
        $response = $IDockDAJIA->DeleteOrder('D20230510070000002008aa1d7708224');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());

    }

    if (0) {
        //非个人申请支付接口
        $response = $IDockDAJIA->UnIndividualPaymentApply('D202306130700000020edc38dc487184');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //影像上传接口
        $appType = 'G_HX';//一级代理和二级代理
        $orgNum = '07000002';//出单机构
        $oprId = '00000020';//操作员编码
        $upType = '1';//上传方式 1（文件流），2（ftp）
        $imageList = [
            'imgName' => 'test111.jpg',//要求英文
            'base64Img' => base64_encode(file_get_contents(__DIR__ . '/test.jpg')),//图片base64编码
            'filedSuffix' => 'jpg',//文件后缀
//            'filedPath' => 'http://fanxinhome.com/600.png',//图片地址 ftp模式必传
        ];
        $visitor = new \IDock\Visitor\UploadFileVisitor();
        $visitor->inquiryNo = 'D2023080707000000209261e41bc6d74';
        $visitor->biInquiryNo = '0070003562023003731';
        $visitor->argc['appCode'] = '80';
        $visitor->argc['dataId'] = '8001';
        $visitor->argc['appType'] = $appType;
        $visitor->argc['orgNum'] = $orgNum;
        $visitor->argc['oprId'] = $oprId;
        $visitor->argc['upType'] = $upType;
        $visitor->argc['imageList'] = $imageList;

        $response = $IDockDAJIA->uploadFile($visitor);
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //根据订单号查询订单状态轨迹接口
        $response = $IDockDAJIA->OrderTrackQueryByOrderNo('D20230807070000002041570f983d914');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //电子签名单证文件列表查询接口 无权访问
        $response = $IDockDAJIA->ElectronicSignFileQuery('0070003562023001223');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (0) {
        //新车备案接口 无权访问
        $response = $IDockDAJIA->NewCarRegister(
            'D20230510070000002008aa1d7708224',
            '07000002',
            '0356',
            '024370',
            'LSVGZ6183J2037364',
            '杨林玉',
            '01',
            '510129197502253121',
            '5',
            '1.29',
            '1.8',
            '1.2',
            '0',
            '01',
            '202012012354125412',
            '2018-05-20 ',
            'K32',
            'LXD1062SHD'
        );
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }

    if (1) {
        //电子保单下载接口 无权访问
        $response = $IDockDAJIA->ElectronicInsuranceDownload('2070003562023000259');
        var_dump($response->isSuccess());
        var_dump($response->getError());
        var_dump($response->getMessage());
        var_dump($response->getData());
    }


} catch (Exception $e) {
    var_dump($e->getMessage());
}
